reftest-compare: Treat colour channels as undefined if alpha is zero
authorSimon McVittie <smcv@debian.org>
Thu, 2 Sep 2021 21:34:14 +0000 (22:34 +0100)
committerSimon McVittie <smcv@debian.org>
Fri, 3 Sep 2021 07:52:36 +0000 (08:52 +0100)
commit068fcd11c8189016b4d121ff041e5d604a690e65
tree9e4b0a9431c5d5e2d23e044e29c5349ccbc4a2ef
parent168fd8109995d41b211463d00113f7ef56eba801
reftest-compare: Treat colour channels as undefined if alpha is zero

If the alpha channel is zero, it doesn't matter what the values of the
red, green and blue channels are: the pixel is still fully transparent.
On most architectures, fully transparent pixels end up all-zeroes
(fully transparent black), matching what's in the reference PNG file;
but on mips*el the blend-difference and blend-normal tests get all-ones
(fully transparent white) and a test failure.

Bug: https://gitlab.gnome.org/GNOME/gtk/-/issues/4227
Signed-off-by: Simon McVittie <smcv@debian.org>
Forwarded: https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/3914
Applied-upstream: 4.5.0

Gbp-Pq: Name reftest-compare-Treat-colour-channels-as-undefined-if-alp.patch
testsuite/reftests/reftest-compare.c